import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect:"/index/index"
  },

  {
    path: '/',
    name: 'Home',
    component: () => import('../views/Home.vue'),
   
    children:[
      {
        path: '/index/index',
        name: 'index',
        component: () => import('../views/index/index.vue')
      },
      {
        path: '/index/home',
        name: 'home',
        component: () => import('../views/index/home.vue')
      },
      {
        path: '/index/fl',
        name: 'fl',
        component: () => import('../views/index/fl.vue')
      },
      {
        path: '/index/my',
        name: 'my',
        component: () => import('../views/index/my.vue')
      },
    ]
  },
  {
    path: '/about',
    name: 'About',
    component: () => import('../views/About.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
